#ifndef __CHADEMORECEIVEPROCESS_H__
#define __CHADEMORECEIVEPROCESS_H__

#include "ChademoLogicProcess.h"
//ReportInit
#define ReportInitRes_ID				0x71//GQ
#define ReportInitRes_Len				32 	//GQ
//AllStop
#define AllStopRes_ID					0x7E//GQ
#define AllStopRes_Len					4 	//GQ
//ReportSLAC
#define ReportSLAC_ID					0x72//GQ
#define ReportSLAC_Len					12	//GQ
//ReportSDP
#define ReportSDP_ID					0x73//GQ
#define ReportSDP_Len					8	//GQ
//ReportV2G/CHAdeMO/AC
#define ReportV2GCHA_ID					0x74//GQ
#define ReportV2GCHA_Len				4	//GQ
//ReportState
#define ReportStateRes_ID				0x75//GQ
#define ReportStateRes_Len				4	//GQ
//SessionSetup
#define CHADEMO_SessionSetupReq_ID				0x02//GQ
#define CHADEMO_SessionSetupReq_Len				4	//GQ
//ChargeParameterDiscovery
#define CHADEMO_ChargeParameterDiscoveryReq_ID	0x08//GQ
#define CHADEMO_ChargeParameterDiscoveryReq_Len	8 	//GQ
//CableCheck
#define CHADEMO_CableCheckReq_ID				0x0F//GQ
#define CHADEMO_CableCheckReq_Len				4 	//GQ
//PowerDelivery
#define CHADEMO_PowerDeliveryReq_ID				0x09//GQ
#define CHADEMO_PowerDeliveryReq_Len			4 	//GQ
//CurrentDemand
#define CHADEMO_CurrentDemandReq_ID				0x11//GQ
#define CHADEMO_CurrentDemandReq_Len			16	//GQ
//WeldingDetection
#define CHADEMO_WeldingDetectionReq_ID			0x12//GQ
#define CHADEMO_WeldingDetectionReq_Len			4	//GQ
//SessionStop
#define CHADEMO_SessionStopReq_ID				0x0C//GQ
#define CHADEMO_SessionStopReq_Len				4	//GQ

#define RNL_CHADEMO_PLCMSG_MINLEN	12
#define RNL_CHADEMO_PLCMSG_MAXLEN	64

void CHAdeMO_ReportInitMsg_Analyse(uint8_t *frame, RNL_CHAdeMOEvccPara *p_rx, RNL_CHAdeMOCommunicationCtrlS *commCtrl);
void CHAdeMO_ReportSLACMsg_Analyse(uint8_t *frame, RNL_CHAdeMOEvccPara *p_rx, RNL_CHAdeMOCommunicationCtrlS *commCtrl);
void CHAdeMO_ReportSDPMsg_Analyse(uint8_t *frame, RNL_CHAdeMOEvccPara *p_rx, RNL_CHAdeMOCommunicationCtrlS *commCtrl);
void CHAdeMO_ReportV2GCHAMsg_Analyse(uint8_t *frame, RNL_CHAdeMOEvccPara *p_rx, RNL_CHAdeMOCommunicationCtrlS *commCtrl);
void CHAdeMO_AllStopMsg_Analyse(uint8_t *frame, RNL_CHAdeMOEvccPara *p_rx, RNL_CHAdeMOCommunicationCtrlS *commCtrl);
void CHAdeMO_ReportStateMsg_Analyse(uint8_t *frame, RNL_CHAdeMOEvccPara *p_rx, RNL_CHAdeMOCommunicationCtrlS *commCtrl);
void CHAdeMO_SessionSetupMsg_Analyse(uint8_t *frame, RNL_CHAdeMOEvccPara *p_rx, RNL_CHAdeMOCommunicationCtrlS *commCtrl);
void CHAdeMO_ChargeParameterDiscoveryMsg_Analyse(uint8_t *frame, RNL_CHAdeMOEvccPara *p_rx, RNL_CHAdeMOCommunicationCtrlS *commCtrl);
void CHAdeMO_PowerDeliveryMsg_Analyse(uint8_t *frame, RNL_CHAdeMOEvccPara *p_rx, RNL_CHAdeMOCommunicationCtrlS *commCtrl);
void CHAdeMO_CableCheckMsg_Analyse(uint8_t *frame, RNL_CHAdeMOEvccPara *p_rx, RNL_CHAdeMOCommunicationCtrlS *commCtrl);
void CHAdeMO_CurrendDemandMsg_Analyse(uint8_t *frame, RNL_CHAdeMOEvccPara *p_rx, RNL_CHAdeMOCommunicationCtrlS *commCtrl);
void CHAdeMO_WeldingDetectionMsg_Analyse( unsigned char *frame, RNL_CHAdeMOEvccPara *p_rx, RNL_CHAdeMOCommunicationCtrlS *commCtrl);
void CHAdeMO_SessionStopMsg_Analyse(uint8_t *frame, RNL_CHAdeMOEvsePara *p_tx, RNL_CHAdeMOEvccPara *p_rx, RNL_CHAdeMOCommunicationCtrlS *commCtrl);
uint8_t CHAdeMORs232MsgUnpack(uint8_t *frame, uint8_t gunId);

#endif //__CHADEMORECEIVEPROCESS_H__
